Skip to content

feat: add OrcaRouter provider#311

Open
zhenjunchen-png wants to merge 1 commit into
charmbracelet:mainfrom
zhenjunchen-png:feat/orcarouter
Open

feat: add OrcaRouter provider#311
zhenjunchen-png wants to merge 1 commit into
charmbracelet:mainfrom
zhenjunchen-png:feat/orcarouter

Conversation

@zhenjunchen-png

Copy link
Copy Markdown

Summary

Add OrcaRouter as a new OpenAI-compatible LLM router.

Disclosure: I'm an engineer on the OrcaRouter team.

Provider Details

  • API Base URL: https://api.orcarouter.ai/v1
  • Auth: Bearer token via ORCAROUTER_API_KEY
  • Type: openai-compat (OpenAI-compatible chat completions, streaming, function calling)
  • Models: full catalog at https://www.orcarouter.ai/models

Models

111 models, including the orcarouter/auto adaptive router. A sample:

Model Context Input $/1M Output $/1M
orcarouter/auto routed routed routed
anthropic/claude-opus-4.8 1M $5 $25
openai/gpt-5.5 128K $5 $30
google/gemini-3.5-flash 1M $1.5 $9
deepseek/deepseek-v4-pro 1M $0.435 $0.87
qwen/qwen3.7-max 1M $1.25 $3.75

Changes

  • Add cmd/orcarouter/main.go, a generator that builds the model list from
    OrcaRouter's public model and pricing data, following the existing
    cmd/aihubmix pattern.
  • Add internal/providers/configs/orcarouter.json.
  • Register the provider in internal/providers/providers.go and add the
    InferenceProviderOrcaRouter constant in pkg/catwalk/provider.go.
  • Add gen:orcarouter to Taskfile.yaml and an OrcaRouter step to the
    update.yml workflow.

Reasoning is advertised for Gemini, Grok, Qwen, DeepSeek, MiniMax, Kimi, and
z.ai models. OpenAI and Anthropic models are served for chat and tool calls but
not reasoning: on chat completions OpenAI rejects tools together with
reasoning_effort (it requires the responses endpoint) and Anthropic uses its
own thinking field.

Validation

  • go build ./..., go vet ./..., go test ./...
  • Tested the live API (non-stream and stream chat, tool calling, reasoning_effort
    across vendors, the auto router, and error paths) and ran Crush against the
    local catalog with OpenAI, Anthropic, and Gemini models all responding.

Usage

export ORCAROUTER_API_KEY=your-key-here
crush --model orcarouter/anthropic/claude-opus-4.8

Add OrcaRouter (https://www.orcarouter.ai), an OpenAI-compatible LLM router,
following the existing cmd/aihubmix generator pattern.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant